package system_design.home.shiti;
import system_design.home.jiekou.*;
import system_design.home.jiekou.IOperation;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: LENOVO
 * Date: 2022-01-05
 * Time: 16:10
 */
public class Customer extends User{
    public Customer(String name) {
        super(name);
        this.iOperation = new IOperation[]{//包含各种操作
                new ExitOperation(),
                new FindOperation(),
                new AddOperation(),
                new DelOperation(),
                new DispalyOperation()
        };
    }
    @Override
    public int menu(){
        System.out.println("=====客户菜单=====");
        System.out.println("Hello " + this.name + "欢迎来到客户订购系统");
        System.out.println("1.查找商品");
        System.out.println("2.添加商品到订单");
        System.out.println("3.删除订单中的商品");
        System.out.println("0.退出菜单");
        System.out.println("==================");
        Scanner input  = new Scanner(System.in);
        int choice = input.nextInt();
        return choice;
    }
}
